package com.augurit.gzcgwsp.state.convert;

import java.util.ArrayList;
import java.util.List;

import org.dozer.DozerBeanMapper;

import com.augurit.gzcgwsp.wfex.bi.web.form.WfBusInstanceFormEX;
import com.augurit.wf.common.entity.WfBusInstance;

public class YwZhengwuNotBjConvert {
	public static WfBusInstanceFormEX convertVoToForm(WfBusInstance entity) {
		if(entity != null) {
			WfBusInstanceFormEX form = new DozerBeanMapper().map(entity, WfBusInstanceFormEX.class);
			return form;
		}else
			return null;
	}
	
	public static List<WfBusInstanceFormEX> convertVoListToFormList(List<WfBusInstance> wWebserviceInfoList) {
		if(wWebserviceInfoList != null && wWebserviceInfoList.size() > 0) {
			List<WfBusInstanceFormEX> ywYnJzfqwczzXnFormList = new ArrayList();
			for(int i=0; i<wWebserviceInfoList.size(); i++) {
				ywYnJzfqwczzXnFormList.add(convertVoToForm(wWebserviceInfoList.get(i)));
			}
			return ywYnJzfqwczzXnFormList;
		}
		return null;
	}
}
